﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wmi.Dfsr;

namespace WMItest
{
    class Program
    {
        static void Main(string[] args)
        {
            Wmi.Connection connectionFCAB2 = new Wmi.Connection("FCAB2", Wmi.WmiNamespace.Cimv2);
            //Wmi.Connection connectionFCAB1  = new Wmi.Connection("FCAB1", Wmi.WmiNamespace.Dfsr);
            //Wmi.Connection connectionVNABO  = new Wmi.Connection("VNABO", Wmi.WmiNamespace.Dfsr);
            //Wmi.Connection connectionFCAB2  = new Wmi.Connection("FCAB2", Wmi.WmiNamespace.Dfsr);
            //Wmi.Connection connectionMDRL   = new Wmi.Connection("MDRL", Wmi.WmiNamespace.Dfsr);



            //Wmi.Dfsr.VolumeInfo dfsrVolumeInfo = new Wmi.Dfsr.VolumeInfo(connection.ManagementScope);
            //dfsrVolumeInfo.Get();
            //Wmi.Dfsr.Info dfsrInfo = new Wmi.Dfsr.Info(connection.ManagementScope);
            //dfsrInfo.Get();

            //Wmi.Dfsr.IdRecordInfo idrecord = new Wmi.Dfsr.IdRecordInfo(connection.ManagementScope);
            //idrecord.Get();

            //Wmi.Dfsr.SyncInfo si = new Wmi.Dfsr.SyncInfo(connection.ManagementScope);
            //si.Get();
            Wmi.cimv2.Cimv2DiskDrive dd = new Wmi.cimv2.Cimv2DiskDrive(connectionFCAB2.ManagementScope);

            dd.Get();
            //Wmi.Dfsr.ReplicatedFolderInfo rfiVNABO = new Wmi.Dfsr.ReplicatedFolderInfo(connectionVNABO.ManagementScope);
            //Wmi.Dfsr.ReplicatedFolderInfo rfiFCAB1 = new Wmi.Dfsr.ReplicatedFolderInfo(connectionFCAB1.ManagementScope);
            //Wmi.Dfsr.ReplicatedFolderInfo rfiFCAB2 = new Wmi.Dfsr.ReplicatedFolderInfo(connectionFCAB2.ManagementScope);

            //Wmi.Dfsr.ReplicatedFolderInfo rfiMDRL = new Wmi.Dfsr.ReplicatedFolderInfo(connectionMDRL.ManagementScope);
            //while (true)
            //{
            //    UInt32 backlogVNABO = rfiVNABO.GetOutboundBacklogFileCount();
            //    Console.WriteLine("VNABO Backlog: {0}", backlogVNABO);

            //    UInt32 backlogFCAB1 = rfiFCAB1.GetOutboundBacklogFileCount();
            //    Console.WriteLine("FCAB1 Backlog: {0}", backlogFCAB1);

            //    UInt32 backlogFCAB2 = rfiFCAB1.GetOutboundBacklogFileCount();
            //    Console.WriteLine("FCAB2 Backlog: {0}", backlogFCAB2);

            //    UInt32 backlogMDRL = rfiMDRL.GetOutboundBacklogFileCount();
            //    Console.WriteLine("MDRL Backlog: {0}", backlogMDRL);

            //    System.Threading.Thread.Sleep(15 * 1000);
            //    rfiVNABO.Update();
            //    rfiFCAB1.Update();
            //    rfiFCAB2.Update();
            //    rfiMDRL.Update();
            //}

        }
    }
}
